<?php if (!defined('THINK_PATH')) exit(); /*a:3:{s:68:"D:\www\fdc\public/../application/manage\view\setting\water_edit.html";i:1492682988;s:63:"D:\www\fdc\public/../application/manage\view\public\header.html";i:1490355172;s:63:"D:\www\fdc\public/../application/manage\view\public\footer.html";i:1474280020;}*/ ?>
<!doctype html>
<html>
<head>
	<meta charset="utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
	<link href="__CSS__/style.css" rel="stylesheet"/>
	<title>管理中心</title>

</head>

<body>
<div id="J_ajax_loading" class="ajax_loading">加载中...</div>

<div class="subnav">
    <div class="content_menu ib_a blue line_x">
        <?php if(!empty($sub_menu) OR !empty($big_menu)): if(!(empty($big_menu) || (($big_menu instanceof \think\Collection || $big_menu instanceof \think\Paginator ) && $big_menu->isEmpty()))): if(isset($normal)): ?>
        <a class="add fb" href="<?php echo $big_menu['iframe']; ?>"><em><?php echo $big_menu['title']; ?></em></a>
        <?php else: ?>
    	<a class="add fb J_showdialog" href="javascript:void(0);" data-uri="<?php echo $big_menu['iframe']; ?>" data-title="<?php echo $big_menu['title']; ?>" data-id="<?php echo $big_menu['id']; ?>" data-width="<?php echo $big_menu['width']; ?>" data-height="<?php echo $big_menu['height']; ?>"><em><?php echo $big_menu['title']; ?></em></a>
        <?php endif; endif; if(!(empty($sub_menu) || (($sub_menu instanceof \think\Collection || $sub_menu instanceof \think\Paginator ) && $sub_menu->isEmpty()))): if(is_array($sub_menu) || $sub_menu instanceof \think\Collection || $sub_menu instanceof \think\Paginator): $key = 0; $__LIST__ = $sub_menu;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$val): $mod = ($key % 2 );++$key;if($key != 1): ?><span>|</span><?php endif; ?>
        <a href="<?php echo $val['url']; ?>" class="<?php echo $val['class']; ?>"><em><?php echo $val['name']; ?></em></a>
        <?php endforeach; endif; else: echo "" ;endif; endif; endif; ?>
    </div>
</div>

<!--图片水印设置-->
<div class="pad_lr_10">
	<div class="col_tab">
		<ul class="J_tabs tab_but cu_li">
			<li class="current">水印设置</li>
		</ul>
		<div class="J_panes">
			<div class="content_list pad_10">
				<form id="info_form" action="<?php echo url('Setting/editDo'); ?>" method="post" enctype="multipart/form-data">
					<table width="100%" class="table_form">
						<tr>
							<th width="150">开启水印 :</th>
							<td>
								<label class="mr10"><input name="data[is_warter]" value="1" type="radio" class="J_change_status" <?php if($info['is_warter'] == '1'): ?>checked<?php endif; ?>> 开启 </label>
								<label><input name="data[is_warter]" type="radio" value="0" class="J_change_status" <?php if($info['is_warter'] == '0'): ?>checked<?php endif; ?>>关闭</label>
							</td>
						</tr>
						<tr>
							<th width="150">水印类型 :</th>
							<td>
								<label class="mr10"><input type="radio" name="data[water_type]" value="1" class="J_change_status" <?php if($info['water_type'] == '1'): ?>checked<?php endif; ?>> 图片</label>
								<label><input type="radio" name="data[water_type]" value="2" class="J_change_status" <?php if($info['water_type'] == '2'): ?>checked<?php endif; ?>> 文字</label>
							</td>
						</tr>
						<tr>
							<th>水印图片 :</th>
							<td>
								<?php if(!(empty($info['water_img']) || (($info['water_img'] instanceof \think\Collection || $info['water_img'] instanceof \think\Paginator ) && $info['water_img']->isEmpty()))): ?>
								<img src="<?php echo $info['water_img']; ?>" width="100" alt="" style="background-color: #5ab431"><br />
								<?php endif; ?>
								<input type="text" name="data[water_img]" id="J_img" class="input-text fl mr10" value="<?php echo $info['water_img']; ?>" size="40"/>
								&nbsp;&nbsp; <div id="J_upload_img" class="upload_btn"><span>上传</span></div></td>
						</tr>

						<tr>
							<th>水印文字 :</th>
							<td><input type="text" name="data[water_text]" class="input-text" value="<?php echo $info['water_text']; ?>" size="40" /></td>
						</tr>
						<tr>
							<th>水印透明度 :</th>
							<td><input type="text" name="data[water_alpha]" class="input-text" value="<?php echo $info['water_alpha']; ?>" size="30" /></td>
						</tr>
						<tr>
							<th>水印文字旋转角度 :</th>
							<td><input type="text" name="data[water_angle]" class="input-text" value="<?php echo $info['water_angle']; ?>" size="30" /></td>
						</tr>
						<tr>
							<th>水印文字大小 :</th>
							<td><input type="text" name="data[water_size]" class="input-text" value="<?php echo $info['water_size']; ?>" size="30" /></td>
						</tr>
						<tr>
							<th>水印文字颜色 :</th>
							<td><input type="text" name="data[water_color]" id="J_color" class="input-text" value="<?php echo $info['water_color']; ?>" size="30" />&nbsp;<a href="javascript:;" class="color_picker_btn"><img class="J_color_picker" data-it="J_title" data-ic="J_color" src="__IMG__/color.png"></a></td>
						</tr>
						<tr>
							<th>水印位置 :</th>
							<td>
								<table width="300" border="0">
									<tr>
										<td><label><input name="data[water_pos]" type="radio" value="1" <?php if($info['water_pos'] == '1'): ?>checked<?php endif; ?>/>顶部居左</label></td>
										<td><label><input name="data[water_pos]" type="radio" value="2" <?php if($info['water_pos'] == '2'): ?>checked<?php endif; ?>/>顶部居中</label></td>
										<td><label><input name="data[water_pos]" type="radio" value="3" <?php if($info['water_pos'] == '3'): ?>checked<?php endif; ?>/>顶部居右</label></td>
									</tr>
									<tr>
										<td><label><input name="data[water_pos]" type="radio" value="4" <?php if($info['water_pos'] == '4'): ?>checked<?php endif; ?>/>左边居中</label></td>
										<td><label><input name="data[water_pos]" type="radio" value="5" <?php if($info['water_pos'] == '5'): ?>checked<?php endif; ?>/>图片中心</label></td>
										<td><label><input name="data[water_pos]" type="radio" value="6" <?php if($info['water_pos'] == '6'): ?>checked<?php endif; ?>/>右边居中</label></td>
									</tr>
									<tr>
										<td><label><input name="data[water_pos]" type="radio" value="7" <?php if($info['water_pos'] == '7'): ?>checked<?php endif; ?>/>底部居左</label></td>
										<td><label><input name="data[water_pos]" type="radio" value="8" <?php if($info['water_pos'] == '8'): ?>checked<?php endif; ?>/>底部居中</label></td>
										<td><label><input name="data[water_pos]" type="radio" value="9"  <?php if($info['water_pos'] == '9'): ?>checked<?php endif; ?> />底部居右</label></td>
									</tr>
								</table>
							</td>
						</tr>
						<tr>
							<th></th>
							<td>
								<input type="hidden" name="name" value="<?php echo $action_name; ?>">
								<input type="hidden" name="id" value="<?php echo $base['id']; ?>">
								<input type="submit" class="btn btn_submit" value="提交"/>
							</td>
						</tr>
					</table>
				</form>
			</div>
		</div>
	</div>
</div>
<script src="__PUBLIC__/js/jquery.min.1.7.2.js"></script>
<script src="__JS__/manage.js"></script>
<script src="__JS__/admin.js"></script>
<script>
//初始化弹窗
(function (d) {
    d['okValue'] = '确定';
    d['cancelValue'] = '取消';
    d['title'] = '标题';
})($.dialog.defaults);
</script>
<script src="__PUBLIC__/js/plugins/formvalidator.js"></script>
<?php if(isset($list_table)): ?>
<script src="__PUBLIC__/js/plugins/listTable.js"></script>
<script>
$(function(){
	$('.J_tablelist').listTable();
});
</script>
<?php endif; ?>
<script src="__PUBLIC__/js/plugins/colorpicker.js"></script>
<script src="__PUBLIC__/js/plugins/fileuploader.js"></script>
<script type="text/javascript">
	$(function(){
		$('.J_color_picker').colorpicker();
		//上传图片
		var img_uploader = new qq.FileUploaderBasic({
			allowedExtensions: ['jpg','gif','jpeg','png'],
			button: document.getElementById('J_upload_img'),
			multiple: false,
			action: "<?php echo url('Setting/ajaxUploadImg'); ?>",
			inputName: 'img',
			forceMultipart: true, //用$_FILES
			showMessage: function(message){
				$.yingloujie.tip({content:message, icon:'error'});
			},
			onSubmit: function(id, fileName){
				$('#J_upload_img').addClass('btn_disabled').find('span').text('上传中...');
			},
			onComplete: function(id, fileName, result){
				$('#J_upload_img').removeClass('btn_disabled').find('span').text('上传');
				if(result.status == '1'){
					$('#J_img').val(result.data);
				} else {
					$.yingloujie.tip({content:result.msg, icon:'error'});
				}
			}
		});
	});

</script>
</body>
</html>